<?php
// +----------------------------------------------------------------------
// | Statistics(博客信息统计
// +----------------------------------------------------------------------
// | @link ( http://www.yurnero.net )
// +----------------------------------------------------------------------
// | @copyright
// +----------------------------------------------------------------------
// | @licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | @author Haijun Wu <nicholasinlove@126.com>
// +----------------------------------------------------------------------
// | $Id: StatisticsWidget.class.php 101 2011-04-22 10:10:57Z nicholasinlove1986@gmail.com $
// +----------------------------------------------------------------------


class StatisticsWidget extends Widget {

	/**
	 * 构造日志归档
	 * 
	 */
	public function render($data) {
	
		$ss    =  f_static_cache('statistics_static','',ROOT_PATH . STATIC_CACHES_DIR);
	    $output = '';
		$output .= '<!-- Statistics: START -->'."\n";
		$output .= " <li class=\"widget widget_statistics dbx-box\">\n";
		$output .= "  <h3 class=\"dbx-handle\">Statistics</h3>\n";
		$output .= "   <ul class='dbx-content' style=\"font-size:8pt;\">\n";
		$output .= "    <li><strong>".$ss['category_num']."</strong> Categories</li>\n";
		$output .= "    <li><strong>".$ss['posts_num']."</strong> Posts</li>\n";
		$output .= "    <li><strong>".$ss['tag_num']."</strong> Tags</li>\n";
		$output .= "    <li><strong>".$ss['comment_num']."</strong> Comments</li>\n";
		$output .= "    <li><strong>".$ss['guestbook_num']."</strong> Messages</li>\n";
		$output .= "    <li><strong>".$ss['trackback_num']."</strong> Trackbacks</li>\n";
		$output .= "    <li><strong>".$ss['attachment_num']."</strong> Attachments</li>\n";
		$output .= "    <li><strong>".$ss['today_num']."</strong> Today Views</li>\n";
		$output .= "    <li><strong>".$ss['total_num']."</strong> Total Views</li>\n";
		$output .= "   </ul>\n";
		$output .= " </li>\n";
		$output .= ' <!-- Statistics: END -->'."\n";
		return $output;
	}
	
}

?>
